//
//  NSDictionary+EV.h
//  EVClub
//
//  Created by sam on 14-8-28.
//  Copyright (c) 2014年 BitRice. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (EV)

- (id)ev_safeObjectForKey:(id)aKey;
- (id)ev_nilObjectForKey:(id)aKey;
- (id)ev_nilObjectForKey:(id)aKey forClass:(Class)objectClass;

- (id)ev_objectForKey:(id)aKey withDefault:(id)defaultValue;
- (id)ev_objectForKeyArray:(NSArray*)keyArray withDefault:(id)defaultValue;

- (NSString *)ev_stringObjectForKey:(id)aKey;
- (NSInteger)ev_integerForKey:(id)aKey;
- (NSInteger)ev_integerForKey:(id)aKey withDefault:(NSInteger)defaultValue;
- (double)ev_doubleForKey:(id)aKey;
- (NSDate *)ev_dateObjectForKey:(id)aKey;
- (BOOL)ev_boolForKey:(id)aKey;
- (BOOL)ev_boolForKey:(id)aKey withDefault:(BOOL)defaultValue;
- (NSArray *)ev_arrayObjectForKey:(id)aKey;
- (NSDictionary *)ev_dictionaryObjectForKey:(id)aKey;
@end



@interface NSDictionary (EVNetWork)

- (NSString *)ev_errorMessage; // 跟NSError统一方法
- (NSInteger)ev_errorCode;
- (NSDictionary *)ev_responseData;
@end
